import LogoutForm from "@/components/LogoutForm";
import { getCookies } from "next-client-cookies/server";
import { redirect } from "next/navigation";

export default function Home() {
  const cookies = getCookies();
  const username = cookies.get("username");

  if (!username) return redirect("/login");
  return (
    <div>
      用户名：{username}
      <LogoutForm />
    </div>
  );
}
